Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize memory usage #86

Merged
merged 6 commits into from
Sep 4, 2024
Merged

Conversation

pederhan
Copy link
Member

@pederhan pederhan commented Sep 4, 2024

This PR aims to reduce the memory usage after #81, which introduced Pydantic models for all API objects.

The PR makes the following adjustments:

  • No longer uses "output": "extend" for many API methods, reducing the amount of data we fetch.
  • Made ZabbixAPI.get_hosts() into a generator of Host objects instead of using a list comprehension to return a list.
  • Removed redundant calls to .keys() on large dicts

@pederhan pederhan merged commit 1e27f04 into unioslo:master Sep 4, 2024
5 checks passed
@pederhan pederhan deleted the optimize-memory-usage branch September 4, 2024 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant